/**
 * Copyright (C), 2019-2020, 宇信融汇
 * FileName: FinallyReturnDmeo_04
 * Author:   666
 * Date:     2020/6/30 23:22
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 666           修改时间           版本号              描述
 */
package c_008.exception;

/**
 * @Classname FinallyReturnDmeo_04
 * @Description TODO
 * @Date 2020/6/30 23:22
 * @Created by 666
 */
public class FinallyReturnDmeo_04 {
    public static void main(String[] args) {
        System.out.println(add().num);
    }

    public static FinallyReturnDmeo_05 add() {
        FinallyReturnDmeo_05 finallyReturnDmeo_05 = new FinallyReturnDmeo_05();
        try {
            System.out.println("try");
            return finallyReturnDmeo_05;
        } catch (Exception e) {
            System.out.println("error");
        } finally {
            if (finallyReturnDmeo_05.num > 20) {
                System.out.println("finally:" + finallyReturnDmeo_05.num);
            }
            finallyReturnDmeo_05.num = 100;

        }
        return finallyReturnDmeo_05;

    }
}

class FinallyReturnDmeo_05 {
    int num = 80;
}